﻿using System.Windows.Controls;
using System.Windows.Media.Imaging;
using System.Windows.Input;
using CharacterCreation.Views.ChildWindows;
using Microsoft.Practices.Prism.Commands;
using System.Windows;

namespace CharacterCreation.Views.Contracts {
    /// <summary>
    /// The bas Host View
    /// </summary>
    public class BaseHostView : BaseView {
        /// <summary>
        /// Gets or sets the CommandButtonsVisible
        /// </summary>
        public Visibility CommandButtonsVisibility {
            get { return _CommandButtonsVisibility; }
            set { _CommandButtonsVisibility = value; }
        }
        private Visibility _CommandButtonsVisibility;
        
        /// <summary>
        /// Adds an item to the currently selected view
        /// </summary>
        public ICommand AddCommand {
            get { return new DelegateCommand(() => { (this.ViewModel as BaseHostViewModel).Add(); }); }
        }

        /// <summary>
        /// Deletes the currently selected item in the current view
        /// </summary>
        public ICommand DeleteCommand {
            get { return new DelegateCommand(() => { (this.ViewModel as BaseHostViewModel).Delete(); }); }
        }

        /// <summary>
        /// Fires the save command on the currently selected view.
        /// </summary>
        public ICommand EditCommand {
            get { return new DelegateCommand(() => { (this.ViewModel as BaseHostViewModel).Edit(); }); }
        }

        /// <summary>
        /// Fires the save command on the currently selected view.
        /// </summary>
        public ICommand SaveCommand {
            get { return new DelegateCommand(() => { (this.ViewModel as BaseHostViewModel).Save(); }); }
        }

        /// <summary>
        /// Fires the save command on the currently selected view.
        /// </summary>
        public ICommand ExportCommand {
            get { return new DelegateCommand(() => { (this.ViewModel as BaseHostViewModel).Export(); }); }
        }

    }
}
